{% load admin_static %}<!doctype html>
{% spaceless %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ LANGUAGE_CODE }}"
      lang="{{ LANGUAGE_CODE }}"
      {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
  <meta name="robots" content="index" />
  <meta name="author" content="Svetlana Chukhareva" />
  <meta name="description" content="labman2" />
  <meta name="keywords" content="experiment results" />
  <title>{% block title %}LabMan2{% endblock %}</title>
  <link rel="stylesheet" type="text/css"
      href="{% block stylesheet %}/static/css/base.css{% endblock %}" />
  {% block extrastyle %}{% endblock %}
  <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css"
      href="{% block stylesheet_ie %}/static/css/ie.css{% endblock %}" />
  <![endif]-->
  {% if LANGUAGE_BIDI %}
  <link rel="stylesheet" type="text/css"
    href="{% block stylesheet_rtl %}/static/css/rtl.css{% endblock %}" />
  {% endif %}
  <script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script>
  {% block extrahead %}{% endblock %}
  {% block blockbots %}{% endblock %}
</head>
{% load i18n %}{% load tabind %}
<body>
  <!-- {% inc 0 %} -->{# this gives initial value for tabindex #}
  <!-- Container -->
  <div id="container">
    <!-- Header -->
    <div id="header">
      <div id="branding">{% block branding %}LabMan2{% endblock %}</div>
      <div id="user-tools">
        {% if user.is_authenticated and user.is_active %}
          {% trans 'Welcome,' %}
          <strong>{% firstof user.first_name user.username %}</strong>.
          {% block userlinks %}
            <a tabindex="{% inc %}" href="/accounts/password/change/">
              {% trans 'Change password' %}</a> /
            <a tabindex="{% inc %}" href="/accounts/password/reset/">
              {% trans 'Reset password' %}</a> /
            <a tabindex="{% inc %}" href="/accounts/logout/">
              {% trans 'Log out' %}</a>
          {% endblock %}
        {% else %}
          <a tabindex="{% inc %}" href="/accounts/login/">{% trans 'Login' %}
          </a> /
          <a tabindex="{% inc %}" href="/logneed/">
            {% trans 'Why login is required?' %}
          </a>
        {% endif %}
        <p>
        {% block setlang %}
          {% for lang in LANGUAGES %}
            <a tabindex="{% inc %}" class="lng"
               href="/tools/i18n/setlang/{{ lang.0 }}">
               <img src="/static/img/flags/{{ lang.0 }}.gif" 
                   alt="{{ lang.1 }} flag" height="15" width="20" />{{ lang.1 }}
            </a>
          {% endfor %}
        {% endblock %}
        </p>
      </div>
    </div>
    <!-- END Header -->

    {% block breadcrumbs %}
      <div class="breadcrumbs">
        <a tabindex="{% inc %}" href="/">{% trans 'Home' %}</a>
        {% if title %} &rsaquo; {{ title }}{% endif %} |
        <a tabindex="{% inc %}" href="/sitemap/">{% trans 'Site Map' %}</a>
      </div>
    {% endblock %}

    {% block messages %}
     {% if messages %}
        <ul class="messagelist">
          {% for message in messages %}
             <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
          {% endfor %}
        </ul>
      {% endif %}
    {% endblock messages %}

    <!-- Content -->
    {% block sidebar %}
      <div id="nav_bar">
        <p><a {# tabindex="{% inc %}" #} href="/">{% trans 'About LabMan2' %}</a></p>
        {% url "django-admindocs-docroot" as docsroot %}
        {% if docsroot %}
        <p><a {# tabindex="{% inc %}" #} href="{{ docsroot }}">{% trans 'Documentation' %}</a></p>
        {% endif %}
        {% if user.is_authenticated and user.is_staff %}
          <p><a {# tabindex="{% inc %}" #} href="/admin/">{% trans 'Admin' %}</a></p>
            <ul class="plainlist">
              <li><a {# tabindex="{% inc %}" #} href="/add/UserGroupPerm/">
              {% trans 'Add Permissions' %}
              </a></li>
              <li><a {# tabindex="{% inc %}" #} href="/permingroups/">
              {% trans 'List of Groups, Users and Permissions' %}
              </a></li>
            </ul>
          <p><a {# tabindex="{% inc %}" #} href="/search/">
          {% trans 'Search' %}
          </a></p>
          <ul class="plainlist">
            <li><a {# tabindex="{% inc %}" #} href="/advsearch/1/">
            {% trans 'Advanced Search' %}
            </a></li>
          </ul>
          <p><a {# tabindex="{% inc %}" #} href="/datalist/">
          {% trans 'Data List' %}
          </a></p>
          <p><a {# tabindex="{% inc %}" #} href="/grouplist/">
          {% trans 'Groups List' %}
          </a></p>
          <p><a {# tabindex="{% inc %}" #} href="/classlist/">
          {% trans 'Classes List' %}
          </a></p>
          {% if mygroups_desktop and classes_desktop %}
          <form class="seldata" action="/openform/add/" method="post">{% csrf_token %}
            <div><select name="dtform">
              {% for fm in dataforms %}
                <option value="{{ fm.0 }}">{{ fm.1 }}</option>
              {% endfor %}
              </select>
              <input type="submit" name="addform" value="Add" />
            </div>
          </form>
          {% endif %}
        {% endif %}
      </div>
    {% endblock %}
    {% block right_sidebar %}{% endblock %}
    <div id="content">
      {% block pretitle %}{% endblock %}
      {% block content_title %}{% endblock %}
      {% block content %}
        {% block object-tools %}{% endblock %}
        {{ content }}
      {% endblock %}

      {% block desktop %}
      <div id="desktop">
        <div id="dt_area">
          {% if desktop_list or mygroups_desktop or classes_desktop %}
          <form action="/setdesktop/" method="post">{% csrf_token %}
            <div id="dt_table">
              <div>
                <div class="in-line-link"><h4>{% trans 'Desktop: currently selected records'%}</h4></div>
                <div class="in-line"><input type="submit" name="delete" value="Remove from desktop" /></div>
              </div>
              {% if desktop_list %}
                <h4>{% trans 'Data:'%}</h4>
              {% for elem in desktop_list %}
                <div>
                  <div class="in-line-link {{ elem.0.base.classname_id|lower }}">
                    <a href="/base/{{elem.0.base_id}}">{{ elem.1 }}</a></div>
                  <div class="in-line"><input type="checkbox" id="obj_{{ elem.0.id }}" name="obj_desk_{{ elem.0.id }}" value="{{ elem.0.id }}" /></div>
                </div>
              {% endfor %}
              {% endif %}
              {% if mygroups_desktop %}
                <h4>{% trans 'Groups:'%}</h4>
              {% for gr in mygroups_desktop %}
                <div>
                  <div class="in-line-link"><a href="/admin/auth/group/{{ gr.group_id }}">{{ gr }}</a></div>
                  <div class="in-line"><input type="checkbox" id="gr_{{ gr.group_id }}" name="gr_desk_{{ gr.id }}" value="{{ gr.id }}" /></div>
                </div>
              {% endfor %}
              {% endif %}
              {% if classes_desktop %}
                <h4>{% trans 'Classes:'%}</h4>
              {% for cls in classes_desktop %}
                <div>
                  <div class="in-line-link">{{ cls }}</div>
                  <div class="in-line"><input type="checkbox" id="cls_{{ cls }}" name="cls_desk_{{ cls.id }}" value="{{ cls.id }}" /></div>
                </div>
              {% endfor %}
              {% endif %}
                <div class="in-line-link">&nbsp;</div>
                <div class="in-line"><input type="submit" name="delete" value="Remove from desktop" /></div>
            </div>
          </form>
          {% else %}
          <p>{% trans 'Desktop has no records'%}</p>
          {% endif %}
        </div>
      </div>
      {% endblock desktop %}
      <br class="clear" />
    </div>
    <!-- END Content -->

    <div id="partners">
      {% block partners-logo %}{% endblock %}
      <br class="clear" />
    </div>

    {% block footer %}
    <div id="footer">
      <p>
        {% trans 'Powered by ' %}
        <a href="http://www.djangoproject.com/">Django</a>
        |
        <a href="http://validator.w3.org/check?uri=referer">
          Valid HTML5
        </a>
        |<a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
        Valid CSS
        </a>
      </p>
    </div>
    {% endblock %}
  </div>

  {% if connect %}
    <table class="prim">
    {% for elem in connect %}
      <tr>
        <td>{{ forloop.counter }}</td>
        <td>{{ elem.sql }}</td>
        <td>{{ elem.time }}</td>
      </tr>
    {% endfor %}
    </table>
  {% endif %}
  <!-- END Container -->
</body>
</html>
{% endspaceless %}
